package com.example.androidprogressbar;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Button;

import com.example.androidprogressbar.widget.HorizontalProgressView;
import com.example.androidprogressbar.widget.ProgressBarView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        HorizontalProgressView horizontalProgressBar = findViewById(R.id.horizontalProgressBar);
        ProgressBarView progressBarView = findViewById(R.id.progressBar);
        Button button = findViewById(R.id.start);

        button.setOnClickListener(v -> {
            horizontalProgressBar.start();
            progressBarView.start();
        });
    }
}